<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <!-- 引入文件 -->
  <script th:src="@{/lib/jquery/jquery-3.2.1.min.js}"></script>
  <script th:src="@{/lib/bootstrap/bootstrap.min.js}"></script>
  <link rel="stylesheet" th:href="@{/lib/bootstrap/bootstrap.min.css}">
  <link rel="stylesheet" th:href="@{/lib/md-fonts/css/materialdesignicons.min.css}">
  <link rel="stylesheet" th:href="@{/lib/normalize/normalize.css}">
  <!-- xyz组件 -->
  <link rel="stylesheet" th:href="@{/lib/xyz_tpl/topbar/topbar.css}">
  <script th:src="@{/lib/xyz_tpl/topbar/topbar.js}"></script>
  <link rel="stylesheet" th:href="@{/lib/xyz_tpl/top_btn/top_btn.css}">
  <script th:src="@{/lib/xyz_tpl/top_btn/top_btn.js}"></script>
  <link rel="stylesheet" th:href="@{/lib/xyz_tpl/search_bar/search_bar.css}">

  <!-- 私有 -->
  <script th:src="@{/sm_search/search.js}"></script>
  <link rel="stylesheet" th:href="@{/sm_search/search.css}">
  <title>搜索结果</title>
  <style>
    #topbar{
      background-image: linear-gradient(120deg, #007bff 0%, #1f89fa 100%) !important;
    }
    #topbar .navbar-toggler{
      color: white !important;
    }
    #top_btn{
      background: #007bff;
      color: white;
    }
    #search_box{
      background-image: linear-gradient(120deg, #007bff 0%, #1f89fa 100%) !important;
    }
    #index_subtitle{
      color: white !important;
    }
    #navbarDropdown, #topbar .title, #topbar .nav_btn, #topbar .name{
      color: white !important;
    }
  </style>
</head>

<body>
<!-- Topbar -->
<nav th:replace="header :: copy"></nav>
<!-- TopBar -->

  <!-- 搜索框 -->
  <div id="search_box">
    <div id="index_subtitle">供给浏览 & 需求发布市场</div>
    <button id="publish" class="btn btn-outline-light" type="button">
      <img src="/sm_search/img/publish.png" alt="">
      <a href="/sm/publish">发布需求</a>
    </button>
    <form id="search" class="container" action="">
      <div class="input-group">
        <input id="search_input" type="text" class="form-control" placeholder="搜索你想要的东西"
          aria-label="Search what you want" aria-describedby="basic-addon2">
        <div class="input-group-append">
          <button class="btn btn-outline-light" type="button" onclick="searchNeed()">
            搜索
            <span class="mdi mdi-magnify"></span>
          </button>
        </div>
      </div>

      <div id="associative_box" class="row col-12 col-sm-6 mt-2">
        <ul id="associative_list"></ul>
      </div>
    </form>
  </div>

  <div id="main" class="container">
    <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
      <li class="nav-item">
        <a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab"
          aria-controls="pills-home" aria-selected="true">单人需求</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab"
          aria-controls="pills-profile" aria-selected="false">学生兼职</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact" role="tab"
          aria-controls="pills-contact" aria-selected="false">众包</a>
      </li>
    </ul>
    <div class="tab-content" id="pills-tabContent"  >


      <!-- 单人需求 -->
      <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
        <!-- 信息浏览（渲染单人需求相关的） -->
        <div class="row demand" th:each="need:${needList1}">
          <div class="col-12">
            <div class="card">
              <h5 class="card-header">分类：单人需求</h5>
              <div class="card-body">
                <h4 class="card-title">[[${need.title}]]</h4>
                <hr>
                <p class="card-text">[[${need.xyzDesc}]]</p>
                <a href="#" th:href="@{'/sm/'+${need.id}}" class="btn btn-primary">查看详情</a>
              </div>
            </div>
          </div>
        </div>
        <!-- 信息浏览 -->

        <div class="footer">- ALL CLEAR 什么都没有了 -</div>
      </div>

      <!-- 学生兼职 -->
      <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
        <!-- 信息浏览（渲染学生兼职相关的） -->
        <div class="row demand" th:each="need:${needList2}">
          <div class="col-12">
            <div class="card">
              <h5 class="card-header">分类：学生兼职</h5>
              <div class="card-body">
                <h4 class="card-title">[[${need.title}]]</h4>
                <hr>
                <p class="card-text">[[${need.xyzDesc}]]</p>
                <a href="#" th:href="@{'/sm/'+${need.id}}" class="btn btn-primary">查看详情</a>
              </div>
            </div>
          </div>
        </div>
        <!-- 信息浏览 -->

       <div class="footer">- ALL CLEAR 什么都没有了 -</div>
      </div>


      <!-- 众包 -->
      <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">
        <!-- 信息浏览（渲染众包相关的） -->
        <div class="row demand" th:each="need:${needList3}">
          <div class="col-12">
            <div class="card">
              <h5 class="card-header">分类：众包</h5>
              <div class="card-body">
                <h4 class="card-title" >[[${need.title}]]</h4>
                <hr>
                <p class="card-text">[[${need.xyzDesc}]]</p>
                <a href="#" th:href="@{'/sm/'+${need.id}}" class="btn btn-primary">查看详情</a>
              </div>
            </div>
          </div>
        </div>
        <!-- 信息浏览 -->
        <div class="footer">- ALL CLEAR 什么都没有了 -</div>
      </div>
    </div>
  </div>

</body>

</html>